<script setup lang="ts">
import { EMediaViewer } from 'exploria-ui';

const src = new URL('./img.png', import.meta.url).pathname;
</script>

<template>
    <div class="using">
        点击图片预览
        <img
            @click="
                (e) =>
                    EMediaViewer.open(
                        src,
                        'image',
                        e.currentTarget as HTMLImageElement,
                    )
            "
            :src="src"
            alt=""
        />
    </div>
</template>

<style lang="scss" scoped>
.using {
    img {
        display: block;
        height: 100px;
        width: 100px;
    }
}
</style>
